const tokenKey = 'token';

// token
const storage = {
    setToken(token) {
        try {
            uni.setStorageSync(tokenKey, token)
        } catch {
            console.log('插入本地缓存错误');
        }
    },
    getToken() {
        try {
            return uni.getStorageSync(tokenKey)
        } catch {
            console.log('读取本地缓存错误');
        }
    },
}

module.exports = storage